<?php
/**
 * Model class representing one category item.
 */
final class Category {

    /** @var int */
    private $id;
    /** @var string */
    private $name;


    /**
     * Create new {@link Todo} with default properties set.
     */
    public function __construct() {
         $now = new DateTime();
    }


    //~ Getters & setters

    /**
     * @return int <i>null</i> if not persistent
     */
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        if ($this->id !== null && $this->id != $id) {
            throw new Exception('Cannot change identifier to ' . $id . ', already set to ' . $this->id);
        }
        $this->id = (int) $id;
    }
    
    public function getName() {
        return $this->name;
    }

    public function setName($name) {
        $this->name = $name;
    }
}

?>
